package com.linjuke.water.core.services.impl;

import java.util.List;

import com.linjuke.water.common.domains.CategoryDO;
import com.linjuke.water.common.services.CategoryService;
import com.linjuke.water.core.dal.datainterface.CategoryDAO;

public class CategoryServiceImpl implements CategoryService {
	
	private CategoryDAO categoryDAO;

	public int create(CategoryDO categoryDO) {
		return categoryDAO.create(categoryDO);
	}

	public void delete(int id) {
		categoryDAO.delete(id);
	}

	public void update(CategoryDO categoryDO) {
		categoryDAO.update(categoryDO);
	}

	public CategoryDO queryById(int id) {
		return categoryDAO.queryById(id);
	}

	@Override
	public List<CategoryDO> listAll() {
		return categoryDAO.listAll();
	}

	public void setCategoryDAO(CategoryDAO categoryDAO) {
		this.categoryDAO = categoryDAO;
	}

}
